import java.util.Scanner;

public class Calculator {
	// 教员要求张浩使用面对对象思想编写一个计算器(Calculator)，可以实现两个整数的加，减，乘，除运算。
	int num1;
	int num2;
	int num3;

	public void calculate() {
		Scanner input = new Scanner(System.in);
		System.out.println("请输入第一个整数：");
		num1 = input.nextInt();
		System.out.println("请输入第二个整数：");
		num2 = input.nextInt();
		System.out.println("1.加,2.减,3.乘,4.除");
		System.out.println("请选择：");
		num3 = input.nextInt();
		switch (num3) {
		case 1: {
			System.out.print("加法：" + (num1 + num2));
			break;
		}
		case 2: {
			System.out.print("减法" + (num1 - num2));
			break;
		}
		case 3: {
			System.out.print("乘法" + (num1 * num2));
			break;
		}
		case 4: {
			System.out.print("除法" + (num1 / num2));
			break;
		}

		}

	}

	public static void main(String[] args) {
		Calculator cal = new Calculator();
		cal.calculate();
	}
}
